package cn.ml.lambda;

import java.util.Arrays;
import java.util.List;

/**
 * 类实例方法语法
 */
public class InstanceDemo {

    public static void main(String[] args) {
        List<String> list = Arrays.asList("aaaa", "bbbb", "cccc");

        //对象实例语法	instanceRef::methodName
        list.forEach(new InstanceDemo()::print);
    }

    public void print(String content){
        System.out.println(content);
    }

}
